﻿using System;
using nkstdgia.main.report;
using wsRK.Web;

namespace nkstdgia.main
{
    public partial class contact : WebPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
            }
        }

        protected void btnControl_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/main/dashboard.aspx");
        }

        protected void btnInsertHS_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/main/bangkhaosat/ctbangkhaosat.aspx");
        }

        protected void btnInsertQH_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/main/thamso/quanhuyen.aspx");
        }

        protected void btnInsertGĐ_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/main/bangkhaosat/ctGiaDoanDuong.aspx");
        }

        protected void WsBtnAction1_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/main/bangkhaosat/dsbangkhaosat.aspx");
        }

        protected void WsBtnAction2_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/main/bangkhaosat/dsbangkhaosatdaxoa.aspx");
        }

        protected void WsBtnAction3_Click(object sender, EventArgs e)
        {
            try
            {
                ExcelCommand eCommand = new ExcelCommand();
                string filename = eCommand.exportGiaDoanDuong();
                base.hideLoader();
                if (!string.IsNullOrEmpty(filename))
                {
                    Response.Redirect("/FileDownload.ashx?type=" + filename);
                }
            }
            catch (Exception)
            {
                base.showMasterMessage("Có lỗi trong quá trình tính dữ liệu !");
            }
            finally
            {
                //base.hideLoader();
            }
        }

    }
}
